home *** CD-ROM | disk | FTP | other *** search
- ##########################################################################
- ## CONFIG.TG
- # This autorun script is run automatically when WinCron is started.
- # Config.tg runs before all other scripts and is intended to 'set-up' the
- # environment for other scripts.
- # See Also: AutoRun.tg
- # Auto loading scripts load in the following order:
- # Config.tg, (AutoRun.tg), (setup.tg), user.tg
- # Config.tg: This file unconditionally starts on WinCron boot
- # AutoRun.tg: This script will start IF WinCron is started as a service
- # setup.tg: This script (if it exists) will run to finish WinCron installation
- # user.tg: This is the user script and never over written by WinCron setup
- {
- -name CONFIG.TG
- -start
- -stop
-
- ###
- # Establish the account name for when we are run as an application or
- # run in the USERS account as a system service
- # This is initially set by the SETUP program:
- # HKEY_LOCAL_MACHINE\Software\Tomasello Software\WinCron\TG.ENVIRONMENT
- #-action -set ACCOUNT_NAME=
-
- ###
- # inform the user what accout we are runnng out of
- -action -print Running as user '%ACCOUNT_NAME%' in account '%TG.ACCOUNT%'
-
- ###
- # Name of the email profile to use
- # This is initially set by the SETUP program:
- # HKEY_LOCAL_MACHINE\Software\Tomasello Software\WinCron\TG.ENVIRONMENT
- #-action -set EMAIL_PROFILE="Microsoft Outlook"
-
- ###
- # inform the user what email profile we are using
- -action -print Using email profile '%EMAIL_PROFILE%'
-
- ###
- # Setup environment variables
-
- # Setup the default location to find USER Scripts
- -action -set TG.SCRIPT_DIR="%TG.ROOT_DIR%Scripts\"
-
- # Setup the default location to find USER Sample Scripts
- -action -set TG.SAMPLE_SCRIPT_DIR="%TG.ROOT_DIR%Sample Scripts\"
-
- # Setup the default location to find USER Sample 'C' Scripts
- -action -set TG.SAMPLE_CSCRIPT_DIR="%TG.ROOT_DIR%Sample Scripts\C\"
-
- # Setup the default location to find USER include files for the 'C' interpreter
- -action -set TG.INCLUDE_DIR="%TG.ROOT_DIR%Sample Scripts\Include\"
-
- ###
- # run a subroutine with the same name as that of the current account.
- # this allows us to run differently depending on how we were loaded/run
- -action -call "%TG.ACCOUNT%"
-
- ###
- # Run common services
-
- # load the FTP service
- # uncomment the next two lines if you wish the FTP service
- #-action -load -internal "%TG.SCRIPT_DIR%"load_ftp_service.tg
- #-action -call load_ftp_service
- #-action -print ................
-
- # load the IMAGEING service
- # uncomment the next two lines if you wish the IMAGEING service
- #-action -load -internal "%TG.SCRIPT_DIR%"load_image_service.tg
- #-action -call load_image_service
- #-action -print ................
-
- # load the STRING service
- # uncomment the next two lines if you wish the STRING service
- -action -load -internal "%TG.SCRIPT_DIR%"load_string_service.tg
- -action -call load_string_service
- -action -print ................
-
- # load the C INTERPRETER service
- # uncomment the next two lines if you wish the C INTERPRETER service
- #-action -load -internal "%TG.SCRIPT_DIR%"load_cscript_service.tg
- #-action -call load_cscript_service
- #-action -print ................
-
- # load the SENDKEYS service
- # uncomment the next two lines if you wish the SENDKEYS service
- -action -load -internal "%TG.SCRIPT_DIR%"load_sendkeys_service.tg
- -action -call load_sendkeys_service
- -action -print ................
-
- ###
- # done!
- -action -print Config.tg: Environment setup complete.
- }
-
- # when run as a system service in my account (PROXY)
- # OR when run as application
- {
- ###
- # the subroutine will have *your* account name by setting the
- # environment variable ACCOUNT_NAME in Config.tg.
- -name %ACCOUNT_NAME%
-
- ###
- #load the MAIL service
- -action -load -internal "%TG.SCRIPT_DIR%"load_mail_service.tg
- -action -call load_mail_service
- -action -print ................
-
- ###
- # done!
- -action -print -+-+-+-+-+-+-+-+
- }
-
- # when run as a system service in LocalSystem account
- {
- ###
- # account name when run in the LocalSystem account
- -name SYSTEM
-
- ###
- # MAPI mail won't run here in LocalSystem account.
- #-action -load -internal "%TG.SCRIPT_DIR%"load_mail_service.tg
- #-action -call load_mail_service
- #-action -print ................
-
- ###
- # Uncomment the next four lines if you want to use the proxy WinCron
- #
- #-action -load -internal "%TG.SCRIPT_DIR%"proxy_initialize.tg
- #-action -call proxy_initialize
-
- #-action -load -internal "%TG.SCRIPT_DIR%"proxy_connect.tg
- #-action -call proxy_connect
- #-action -print ................
-
- ###
- # done!
- -action -print -+-+-+-+-+-+-+-+
- }